using System;
using System.IO;

namespace MMXSaveGameConverter
{
    internal sealed class LgsReadState : IReaderState
    {
        private readonly DisposableStack _disposables = new DisposableStack();

        public readonly Stream LgsInput;
        public readonly Stream PngInput;

        public LgsReadState(string fullPath)
        {
            LgsInput = _disposables.Add(File.OpenRead(Path.ChangeExtension(fullPath, ".lgs")));
            PngInput = _disposables.Add(File.OpenRead(Path.ChangeExtension(fullPath, ".png")));
        }

        public bool SaveMetaReaded;
        public bool SaveGameReaded;
        public bool ScreenshotReaded;

        public void Dispose()
        {
            _disposables.Dispose();
        }
    }
}